Data is written on a NAND flash memory (hereinafter referred to as a NAND memory) in a writing data unit called a page. There is a method of protecting data stored in the NAND flash memory by performing error-correction coding for each of write data in plural pages.